﻿@model PilotProject.Question
@{
    Layout = "~/Views/Shared/_AdminLayout.cshtml";
}
<script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

<div id="form" class="myForm" style="height:400px;">
@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)

    <fieldset style="margin-top:20px;height:350px;">
        <legend style="color:Blue;font-size:14px;">Type - @Model.TestEngine.TestEngineDescription</legend>

        @Html.HiddenFor(model => model.Id)
        @Html.HiddenFor(model => model.CreateDateTime)
        @Html.HiddenFor(model => model.TestEngineId)
        @Html.HiddenFor(model => model.QuestionText)

        <div class="editor-label">          
            @Html.ValidationMessage("Error Disabling Question : ")
        </div><br /> 

        <div class="editor-label">
        </div>

        <textarea readonly="readonly" rows="12" cols="90">
        @Model.QuestionText
           
            @foreach (var item in @Model.Options)
            {
                if (item.IsCorrect)
                {
                 <text>@item.OptionText -- CORRECT --</text> 
                }
                else
                {
                 <text>@item.OptionText</text>
                }
            }

        </textarea>

        <div style="width:30px;">
            @Html.LabelFor(model => model.IsActive)
        </div>
        <div style="width:10px;">
          <p>  @Html.EditorFor(model => model.IsActive) </p>
               @Html.ValidationMessageFor(model => model.IsActive)
        </div>

        <p>
            <input type="submit" value="Save"  class="quizb"/>
        </p>
    </fieldset>
}
 </div>
<div>
    @Html.ActionLink("Back to List", "Index")
</div>
